Azure Maps Traffic Service (preview:1.0)

2025/03/26 • 5 updated methods

Traffic_GetTrafficFlowTile (updated)
Description > [!NOTE] > > **Azure Maps Traffic v1 service retirement** > > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api). The `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the difference between that speed and the free-flow speed on the road segment in question.
Reference Link ¶

⚶ Changes

{
  "#id": "Traffic_GetTrafficFlowTile",
  "Description": {
    "new": "\n\n> [!NOTE]\n>\n> **Azure Maps Traffic v1 service retirement**\n>\n> The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api).\n\nThe `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the difference between that speed and the free-flow speed on the road segment in question.",
    "old": "\n\nThe `Traffic Flow Tile` API is an HTTP `GET` request that returns real-time information about traffic conditions in 256 x 256 pixel tiles that show traffic flow. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. The Flow tiles use colors to indicate either the speed of traffic on different road segments, or the difference between that speed and the free-flow speed on the road segment in question."
  }
}

⚼ Request

GET:  /traffic/flow/tile/{format}
{
x-ms-client-id: string ,
api-version: string ,
format: string ,
style: string ,
zoom: integer ,
x: integer ,
y: integer ,
thickness: integer ,
}

⚐ Response (200)

{
$headers:
{
content-type: string ,
}
,
$schema: object ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
Traffic_GetTrafficFlowSegment (updated)
Description > [!NOTE] > > **Azure Maps Traffic v1 service retirement** > > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api). The `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow Segment` API, the client side can connect any place in the map with flow data on the closest road and present it to the user.
Reference Link ¶

⚶ Changes

{
  "#id": "Traffic_GetTrafficFlowSegment",
  "Description": {
    "new": "\n\n> [!NOTE]\n>\n> **Azure Maps Traffic v1 service retirement**\n>\n> The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api).\n\nThe `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow Segment` API, the client side can connect any place in the map with flow data on the closest road and present it to the user.",
    "old": "\n\nThe `Traffic Flow Segment` API is an HTTP `GET` request that provides information about the speeds and travel times of the road fragment closest to the given coordinates. It is designed to work alongside the Flow layer of the [Render](/rest/api/maps/render) Service to support clickable flow data visualizations. With the `Traffic Flow Segment` API, the client side can connect any place in the map with flow data on the closest road and present it to the user."
  }
}

⚼ Request

GET:  /traffic/flow/segment/{format}
{
x-ms-client-id: string ,
api-version: string ,
format: string ,
style: string ,
zoom: integer ,
query: array ,
unit: string ,
thickness: integer ,
openLr: boolean ,
}

⚐ Response (200)

{
flowSegmentData:
{
frc: string ,
currentSpeed: integer ,
freeFlowSpeed: integer ,
currentTravelTime: integer ,
freeFlowTravelTime: integer ,
confidence: number ,
coordinates:
{
coordinate:
[
{
latitude: number ,
longitude: number ,
}
,
]
,
}
,
@version: string ,
openlr: string ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
Traffic_GetTrafficIncidentTile (updated)
Description > [!NOTE] > > **Azure Maps Traffic v1 service retirement** > > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api). The `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on the roads in the specified area.
Reference Link ¶

⚶ Changes

{
  "#id": "Traffic_GetTrafficIncidentTile",
  "Description": {
    "new": "\n\n> [!NOTE]\n>\n> **Azure Maps Traffic v1 service retirement**\n>\n> The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api).\n\nThe `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on the roads in the specified area.",
    "old": "\n\nThe `Traffic Incident Tile` API is an HTTP `GET` request that returns 256 x 256 pixel tiles showing traffic incidents. All tiles use the same grid system. Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display. Traffic tiles render graphics to indicate traffic on the roads in the specified area."
  }
}

⚼ Request

GET:  /traffic/incident/tile/{format}
{
x-ms-client-id: string ,
api-version: string ,
format: string ,
style: string ,
zoom: integer ,
x: integer ,
y: integer ,
t: string ,
}

⚐ Response (200)

{
$headers:
{
content-type: string ,
}
,
$schema: object ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
Traffic_GetTrafficIncidentDetail (updated)
Description > [!NOTE] > > **Azure Maps Traffic v1 service retirement** > > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api). The `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from the [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API.
Reference Link ¶

⚶ Changes

{
  "#id": "Traffic_GetTrafficIncidentDetail",
  "Description": {
    "new": "\n\n> [!NOTE]\n>\n> **Azure Maps Traffic v1 service retirement**\n>\n> The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api).\n\nThe `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from the [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API.",
    "old": "\n\nThe `Traffic Incident Detail` API is an HTTP `GET` request that provides information on traffic incidents inside a given bounding box, based on the current [Traffic Model ID](#uri-parameters). The Traffic Model ID is available to grant synchronization of data between calls and API's. The Traffic Model ID is a key value for determining the currency of traffic incidents. It is updated every minute, and is valid for two minutes before it times out. It is used in rendering [incident tiles](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidenttile). It can be obtained from the [Viewport](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentviewport) API."
  }
}

⚼ Request

GET:  /traffic/incident/detail/{format}
{
x-ms-client-id: string ,
api-version: string ,
format: string ,
style: string ,
boundingbox: array ,
boundingZoom: integer ,
trafficmodelid: string ,
language: string ,
projection: string ,
geometries: string ,
expandCluster: boolean ,
originalPosition: boolean ,
}

⚐ Response (200)

{
tm:
{
@id: string ,
poi:
[
{
id: string ,
p:
{
x: number ,
y: number ,
}
,
ic: integer ,
ty: integer ,
cbl:
{
x: number ,
y: number ,
}
,
ctr:
{
x: number ,
y: number ,
}
,
cs: integer ,
l: integer ,
r: string ,
sd: string ,
ed: string ,
dl: integer ,
t: string ,
f: string ,
d: string ,
c: string ,
}
,
]
,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
Traffic_GetTrafficIncidentViewport (updated)
Description > [!NOTE] > > **Azure Maps Traffic v1 service retirement** > > The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api). The `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the viewport described in the request. It should be called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a location, or displaying a route). The request should contain the bounding box and zoom level of the viewport whose information is needed. The return will contain map version information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to retrieve last traffic information for further processing.
Reference Link ¶

⚶ Changes

{
  "#id": "Traffic_GetTrafficIncidentViewport",
  "Description": {
    "new": "\n\n> [!NOTE]\n>\n> **Azure Maps Traffic v1 service retirement**\n>\n> The Azure Maps [Traffic v1](/rest/api/maps/traffic?view=rest-maps-1.0) service is now deprecated and will be retired on 3/31/28. To avoid service disruptions, all calls to Traffic v1 service will need to be updated by 3/31/28. For more information, see [Migrate Azure Maps Traffic 1.0 APIs](/azure/azure-maps/migrate-traffic-v1-api).\n\nThe `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the viewport described in the request. It should be called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a location, or displaying a route). The request should contain the bounding box and zoom level of the viewport whose information is needed. The return will contain map version information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to retrieve last traffic information for further processing.",
    "old": "\n\nThe `Traffic Incident Viewport` API is an HTTP `GET` request that returns legal and technical information for the viewport described in the request. It should be called by client applications whenever the viewport changes (for instance, through zooming, panning, going to a location, or displaying a route). The request should contain the bounding box and zoom level of the viewport whose information is needed. The return will contain map version information, as well as the current Traffic Model ID and copyright IDs. The Traffic Model ID returned by the Viewport Description is used by other APIs to retrieve last traffic information for further processing."
  }
}

⚼ Request

GET:  /traffic/incident/viewport/{format}
{
x-ms-client-id: string ,
api-version: string ,
format: string ,
boundingbox: array ,
boundingzoom: integer ,
overviewbox: array ,
overviewzoom: integer ,
copyright: boolean ,
}

⚐ Response (200)

{
viewpResp:
{
trafficState:
{
@trafficAge: integer ,
@trafficModelId: string ,
}
,
copyrightIds: string ,
@version: string ,
@maps: string ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}